package com.xyq.gateway.proterties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.List;

@Configuration
@RefreshScope
@ConfigurationProperties(prefix = "security.ignore")   // 通过这个配置获取 nacos 上配置的白名单
public class IgnoreWhiteProperties {
    /**
     * 放⾏⽩名单配置，⽹关不校验此处的⽩名单
     */
    private List<String> whites = new ArrayList<>();   // Nacos 配置好这个whites白名单

    public List<String> getWhites()     // 1. 获取所有的白名单 ,
    {
        return whites;
    }

    public void setWhites(List<String> whites) {
        this.whites = whites;
    }
}
